from enum import Enum

main_window_width = 1280
main_window_height = 720

card_width = 65
card_height = 95

fix_distance = 10
game_window_width = 650
game_window_height = 650

canvas_width = 600
canvas_height = 600
canvas_bg_color = 'lightgray'  # 画布背景颜色

select_color = '#00BFFF'
unselect_color = 'white'

UNSELECTED = -1
NONE_INT = -1

SINGLE_SUIT_CARD_NUM = 13   # 单花色牌的数量
CARD_BACKGROUND = -1         # 牌背
CARD_START_ID = 0           # 牌的起始ID 黑桃 A, 注意策划从 1 开始
JOKER_SMALL = 53
JOKER_BIG = 34

CARD_CUSTOM_RULE = 55       # 自定义规则牌

HIDE_SWITCH = 'key_hide_toolbar'

class GenerateType(Enum):
    NORMAL = 0
    CUSTOM = 1

FILE_NAME_FORMAT = '%d%d.json'

# 定义扑克牌的属性
suits_str = ['♠', '♥', '♣', '♦']  # 花色：黑桃、红心、梅花、方块
ranks_str = ['A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K']  # 点数
ranks_count = len(ranks_str)

class TouchEvent(Enum):
    START = 1
    MOVE = 2
    END = 3

class Suits(Enum):
    Spades = 0
    Hearts = 1
    Clubs = 2
    Diamonds= 3

class CardType(Enum):
    NONE = 0
    Pair = 1
    Triple = 2
    Bomb = 3
    
# event names

event_show_details = 'show_details'                 # 显示牌的详细属性
event_open_file = 'open_file'                       # 打开文件
event_save_file = 'save_file'                       # 保存文件
event_new_file = 'new_file'                         # 新建文件
event_guide_menu_cliciked = 'guide_menu_clicked'    # 左侧导航菜单点击事件

event_select_card_move = 'event_select_card_move'             # 牌堆选中牌
event_change_layer = 'change_layer'                 # 牌切换层
event_on_menu_refreh = 'event_on_menu_refreh'
event_on_new_card = 'event_on_new_card'
event_on_del_card = 'event_on_del_card'

event_select_card = 'select_card_start'             # 牌堆选中牌
event_show_tip_info = 'event_show_tip_info'               # 显示提示信息
event_show_toast = 'event_show_toast'
event_card_value_changed = 'card_value_changed'
event_reset_all = 'event_reset_all'